package com.gxa.autoparts.admin.service.impl;

import com.gxa.autoparts.admin.mapper.CouponUseRecordMapper;
import com.gxa.autoparts.admin.service.CouponUseRecordService;
import com.gxa.autoparts.core.pojo.CouponUseRecord;
import com.gxa.autoparts.core.service.impl.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author R
 * @data 2022-01-10 17:25
 */
@Service
public class CouponUseRecordServiceImpl extends BaseServiceImpl<CouponUseRecord> implements CouponUseRecordService {

    @Autowired
    CouponUseRecordMapper couponUseRecordMapper;

    @Override
    public Long getCouponIdByOrderId(Long orderId) {
        return couponUseRecordMapper.getCouponIdByOrderId(orderId);
    }

    @Override
    public void deleteByOrderId(Long orderId) {
        couponUseRecordMapper.deleteByOrderId(orderId);
    }
}
